home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
TextEdit
/
TextEditClipboard.cp
next >
Wrap
Text File
|
2000-06-23
|
740b
|
51 lines
// TextEditClipboard.cp
#ifndef TextEditClipboard_h
#include "TextEditClipboard.h"
#endif
#ifndef OSError_h
#include "OSError.h"
#endif
#include <TextEdit.h>
#include <Errors.h>
TextEditClipboard::~TextEditClipboard()
{
try
{
Flush();
}
catch ( ... )
{
}
}
void TextEditClipboard::Import( const ScrapReader& )
{
OSErr error = TEFromScrap();
if ( error != noTypeErr )
ThrowOSError( error );
}
void TextEditClipboard::Export( ScrapWriter& ) const
{
ThrowOSError( TEToScrap() );
}
void TextEditClipboard::Clear()
{
}
TextEditClipboard& TextEditClipboard::The()
{
static TextEditClipboard the;
return the;
}
uint32 TextEditClipboard::Length()
{
Validate();
return TEGetScrapLength();
}